package com.yzf.web;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.yzf.entity.Goal;
import com.yzf.entity.Project;
import com.yzf.service.GoalService;
import com.yzf.util.web.ServletUtil;

public class goal extends HttpServlet {

	private static final long serialVersionUID = 1L;

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		Project p = (Project) ServletUtil.getSession(request).getAttribute("project");
		
		List<Goal> list = new GoalService().findByPidAndEid(p.getId());
		ServletUtil.setRequestAttribute("list", list, request);
		ServletUtil.forword(request, response, "goal");
	}

}
